package com.zcl.iweibo;

import com.zcl.utils.DialogFactory;

import android.app.Activity;
import android.app.Dialog;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class AuthorizeActivity extends Activity {
	private final int AUTHORIZE_DIALOG = 1; 
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_authorize);
		
		showDialog(AUTHORIZE_DIALOG);
	}

	@Override
	protected Dialog onCreateDialog(int id) {
		switch (id) {
		case AUTHORIZE_DIALOG:
			return DialogFactory.createDialog(this, R.string.authTip, R.string.authTipMessage, R.string.text_begin, clickListener);
		default:
			break;
		}
		return super.onCreateDialog(id);
	}
	
	OnClickListener clickListener = new OnClickListener() {
		@Override
		public void onClick(View v) {
			Intent intent = new Intent(AuthorizeActivity.this, WebViewActivity.class);
			startActivity(intent);
//			finish();
		}
	};
}
